<div class="collateral-box">
    <div class="head">
        <h4><?php echo $this->__('Questions and Answers') ?></h4>
    </div>
    <div class="collateral-box" id="zhishidi-question">
        <p><a href="#question-form" id="ask-question"><strong><?php echo $this->__('Ask your question'); ?></strong></a></p>
        <?php $entries = $this->loadQuestionCollection(); ?>
        <?php if (!$entries->getSize()): ?>
            <p><strong><?php echo $this->__('There are no entries.') ?></strong></p>
        <?php else: ?>
        <?php echo $this->getPagerHtml(); ?>
        <?php foreach ($entries as $entry): ?>
                    <div class="question-entry">
                        <p>
                            <small class="added-on"><?php echo $this->__('Posted By: '); ?><?php echo $entry->getName(); ?></small>
                            <small class="added-on"><?php echo $this->__('On: '); ?><?php echo $this->formatDate($entry->getCreatedOn()); ?></small>
                        </p>
                        <div class="entry-comment"><strong><?php echo $this->__('Q'); ?>: </strong><?php echo $this->htmlEscape($entry->getQuestion()); ?></div>
                        <div class="entry-answer"><strong><?php echo $this->__('A'); ?>: </strong><?php echo $this->getContent($entry->getAnswer()); ?></div>
                    </div>
        <?php endforeach; ?>
        <?php endif; ?>
                    
        <?php echo $this->getChildHtml('zhishidi.question.list.form'); ?>
    </div>
</div>    


